<?php

//链接数据库
	$data = new mysqli('127.0.0.1','root','','friday');
    $phone = $_POST['phone']; 
	$psw = $_POST['psw'];
	//设置中文
	mysqli_query($data,"SET NAMES utf8");
	//设置查询语句
	$sql = 'select * from zhanghao where phone = '.$phone;
	$dbpassword =null;
	//执行
    //执行sql语句
	if($query = mysqli_query($data, $sql)){
		while ($row=mysqli_fetch_assoc($query)) {  
//          $dbusername=$row["phone"];  
            $dbpassword=$row["pas"];  
			$arr[]= $row;
        
		
	}
		$rowcount = mysqli_num_rows($query);
		if($rowcount>0){
			if($psw==$dbpassword){
				echo json_encode($arr);
			}else{
				echo 'a';
			}
			
			
		}else{
			echo 'b';
		}
	}else{
		echo 'c';
	}
		
	mysqli_close($data);
?>